<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象的增强</title>
</head>
<body>

</body>
<script>
//es5
const person={
    //放 键值对
    name:'shane',
    age:18,
    run:function(){
        console.log("shane is running");
    }
}
//es6 简写
let name = 'kitty'
const person2={
    name,
    age:15,
    run(){
        console.log("kitty is running");
    },
    walk(){
        console.log("kitty is walking")
    }
} 
// 扩展符号...
obj = {name:'Tom'}
obj2 = {
    run(){
        console.log("Tom is running");
    }
}

</script>
</html>